package com.ysd.lis.controller.sta;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.sta.StaItemDictParam;
import com.ysd.lis.entity.sta.StaTextResult;
import com.ysd.lis.service.sta.StaTextResultService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * cold_chain.sys_module 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-12-18
 */
@Api(tags = "标准文字结果")
@RestController
@RequestMapping("/lis/sta/staTextResult")
public class StaTextResultController extends BaseController {

    @Autowired
    StaTextResultService staTextResultService;

    @ApiOperation("不分页查询")
    @GetMapping("/findStaTextResultList")
    public Result findStaTextResultList(StaItemDictParam param){
        return staTextResultService.findStaTextResultList(param);
    }

    @ApiOperation("批量删除文字结果")
    @PostMapping("/batchDeleteStaTextResult")
    public Result batchDeleteStaTextResult(@RequestBody List<StaTextResult> staTextResults) {
        return staTextResultService.batchDeleteStaTextResult(staTextResults);
    }

    @ApiOperation("批量新增或修改文字结果")
    @PostMapping("/saveOrUpdateStaTextResult")
    public Result saveOrUpdateStaTextResult(@RequestBody List<StaTextResult> staTextResults) {
        return staTextResultService.saveOrUpdateStaTextResult(staTextResults);
    }


}
